{extend name="base" /}
{block name="body"}
<div class="layui-fluid">
    <div class="layui-card">
        <!--tab标签-->
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                <li class="layui-this">友情链接</li>
                <li class=""><a href="{:url('admin/link/add')}">添加链接</a></li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <table class="layui-table">
                        <thead>
                        <tr>
                            <th style="width: 30px;">ID</th>
                            <th style="width: 30px;">排序</th>
                            <th>名称</th>
                            <th>链接</th>
                            <th>状态</th>
                            <th style="width: 130px;">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {foreach name="link_list" item="vo"}
                        <tr>
                            <td>{$vo.id}</td>
                            <td>{$vo.sort}</td>
                            <td>{$vo.name}</td>
                            <td>{$vo.url}</td>
                            <td>{php}echo $vo['status'] ? '显示' : '隐藏';{/php}</td>
                            <td>
                                <a href="{:url('admin/link/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-sm">编辑</a>
                                <a href="{:url('admin/link/delete',['id'=>$vo['id']])}" class="layui-btn layui-btn-danger layui-btn-sm ajax-delete">删除</a>
                            </td>
                        </tr>
                        {/foreach}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}